<!--[if ie 6]>
      <style type="text/css">
      div#content div.buttonMinibox{width:200px;display:inline;float:none;overflow: hidden;}
      div#content div.buttonBox{width:600px;height:30px;}
      </style>
<![endif]-->

<?php
	
	echo $accessibility->whereIAm($pageTitle,array(array('title'=>'Eventos','link'=>'/events'),array('title'=>'Visualizar evento')));
	echo $this->renderElement('message');
	echo "<h2 id='contentTitle'>".$pageTitle."</h2>";
	echo "<div id='view'>";
	echo "<p><label>Título: </label><span>".$event['Event']['title']."</span></p>";
	echo "<p><label>Título resumido: </label><span>".$event['Event']['headline']."</span></p>";
	echo "<p><label>Detalhes: </label><span>".$event['Event']['detail']."</span></p>";
	echo "<p><label>Data: </label><span>".$event['Event']['date']."</span></p>";
	echo "<p><label>Local: </label><span>".$event['Event']['location']."</span></p>";
	echo "<p><label>Calendário: </label><span>".$event['Calendar']['name']."</span></p>";


	echo "<p><label>Entidade: </label><span>".$event['Organization']['nome']."</span></p>";
	echo "<br />";
	
	/* Botoes - Inicio */
	$entity = 'events';
	$model = 'Event';
	$label = 'evento';
	$label_plural = 'eventos';
	
	echo "<div class='buttonBox'>";
	echo "<div class='buttonMinibox'>";
	$listButton = "<span class=\"buttonList\">Listar ".$label_plural."</span>";
	echo html_entity_decode($html->link($listButton, '/'.$entity.'/',array('class'=>'button')));
	echo "</div>";
	echo "<div class='buttonMinibox'>";
	if ($othAuth->hasPermission($entity.'/edit/')) {
		$editButton = "<span class=\"buttonEdit\">Editar ".$label."</span>";
		echo html_entity_decode($html->link($editButton, '/'.$entity.'/edit/'.$event[$model]['id'],array('class'=>'button')));
	}
	echo "</div>";
	
	if ($othAuth->hasPermission('forums/delete/')) { 
		echo "<div class='buttonMinibox'>";
		if ($othAuth->hasPermission($entity.'/delete/')) {
			$deleteButton = "<span class=\"buttonDelete\">Apagar ".$label."</span>";
			echo html_entity_decode($html->link($deleteButton,'/'.$entity.'/delete/'.$event[$model]['id'], array('class'=>'button'), 'Confirma a exclusão deste item?'));
		}
		echo "</div>";
	}
	echo "</div>";
	/* Botoes - Fim */
	
	echo "</div>";
